Optimal. Leaf size=67 \[ -\frac {\sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 \sqrt {a+i a \tan (c+d x)}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3608, 3561,
212} \begin {gather*} \frac {2 \sqrt {a+i a \tan (c+d x)}}{d}-\frac {\sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3561
Rule 3608
Rubi steps
\begin {align*} \int \tan (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx &=\frac {2 \sqrt {a+i a \tan (c+d x)}}{d}-i \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=\frac {2 \sqrt {a+i a \tan (c+d x)}}{d}-\frac {(2 a) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {\sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 \sqrt {a+i a \tan (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 77, normalized size = 1.15 \begin {gather*} \frac {e^{-i (c+d x)} \left (2 e^{i (c+d x)}-\sqrt {1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right ) \sqrt {a+i a \tan (c+d x)}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 53, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {2 \sqrt {a +i a \tan \left (d x +c \right )}-\sqrt {a}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{d}\) | \(53\) |
default | \(\frac {2 \sqrt {a +i a \tan \left (d x +c \right )}-\sqrt {a}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{d}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 83, normalized size = 1.24 \begin {gather*} \frac {\sqrt {2} a^{\frac {5}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + 4 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{2}}{2 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 187 vs. \(2 (52) = 104\).
time = 0.42, size = 187, normalized size = 2.79 \begin {gather*} -\frac {\sqrt {2} d \sqrt {\frac {a}{d^{2}}} \log \left (4 \, {\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {a}{d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - \sqrt {2} d \sqrt {\frac {a}{d^{2}}} \log \left (-4 \, {\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {a}{d^{2}}} - a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - 4 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \tan {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.04, size = 54, normalized size = 0.81 \begin {gather*} \frac {2\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}-\frac {\sqrt {2}\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________